home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
qex
/
ultvfo
/
ad7008v3.obj
< prev
next >
Wrap
Text File
|
1996-03-27
|
41KB
|
731 lines
Freeware assember ASxx.EXE Ver 1.03.
0001 *THE ULTIMATE VFO
0002 *ANALOG DEVICES AD7008 DIRECT DIGITAL SYNTHESIS CHIP
0003 *USING THE MOTOROLA MC68HC811E2FN MICROCOMPUTER
0004 *BY DONALD S. KIRK (WD8DSB) 27MR96
0005 f800 ORG $F800
0006 1000 PORTA EQU $1000
0007 1004 PORTB EQU $1004
0008 1003 PORTC EQU $1003
0009 1007 DDRC EQU $1007
0010 1008 PORTD EQU $1008
0011 1009 DDRD EQU $1009
0012 1030 ADCTL EQU $1030 FOR A/D
0013 1039 OPTION EQU $1039 FOR A/D
0014 1031 ADR1 EQU $1031 FOR A/D
0015 1032 ADR2 EQU $1032 FOR A/D
0016 1033 ADR3 EQU $1033 FOR A/D
0017 1034 ADR4 EQU $1034 FOR A/D
0018 0080 CHAR EQU $80
0019 1024 TMSK2 EQU $1024 FOR PULSE ACCUMULATOR
0020 1025 TFLG2 EQU $1025 FOR PULSE ACCUMULATOR
0021 1026 PACTL EQU $1026 FOR PULSE ACCUMULATOR
0022 1027 PACNT EQU $1027 FOR PULSE ACCUMULATOR
0023 1035 BPROT EQU $1035 EEPROM BLOCK PROTECT
0024 0081 LOBYTE EQU $81
0025 0082 TEMP EQU $82
0026 0083 PHASE EQU $83 PHASE VALUE REGISTERS FOR FREQ0=TX
0027 0084 PHASE1 EQU $84
0028 0085 PHASE2 EQU $85
0029 0086 PHASE3 EQU $86
0030 0087 SERCNT EQU $87
0031 0088 HOLD EQU $88
0032 0089 HOLD+1 EQU $89
0033 008a BYTE EQU $8A
0034 008b BYTE+1 EQU $8B
0035 008c BYTE+2 EQU $8C
0036 008d BYTE+3 EQU $8D
0037 008e BCD EQU $8E
0038 008f BCD+1 EQU $8F
0039 0090 BCD+2 EQU $90
0040 0091 BCD+3 EQU $91
0041 0092 ANS EQU $92
0042 0093 ANS+1 EQU $93
0043 0094 ANS+2 EQU $94
0044 0095 ANS+3 EQU $95
0045 0096 BCDCTR EQU $96
0046 0097 RATE EQU $97
0047 0098 RATE+1 EQU $98
0048 0099 RATE+2 EQU $99
0049 009a RATE+3 EQU $9A
0050 009b IF EQU $9B
0051 009c IF+1 EQU $9C
0052 009d IF+2 EQU $9D
0053 009e IF+3 EQU $9E
0054 009f BAND EQU $9F
0055 00a0 BAND+1 EQU $A0
0056 00a1 FREQ EQU $A1 FLAG REGISTER FOR FREQ0/FREQ1
0057 00a2 PHARX EQU $A2 PHASE VALUE REGISTERS FOR FREQ1=RX
0058 00a3 PHARX1 EQU $A3
0059 00a4 PHARX2 EQU $A4
0060 00a5 PHARX3 EQU $A5
0061 00a6 RITRAW EQU $A6
0062 00a7 RITFRQ EQU $A7
0063 00a8 IFSTAT EQU $A8
0064
0065 *MAIN
0066 f800 8e 00 ff LDS #$00FF INITIALIZE STACK
0067 f803 86 7f LDAA #$7F CONFIG PORT C FOR LCD DISPLAY
0068 f805 b7 10 07 STAA DDRC
0069 f808 7f 10 09 CLR DDRD CONFIG PORT D FOR IF SET AND BAND SELECT INPUTS
0070 f80b 86 00 LDAA #$00
0071 f80d b7 10 35 STAA BPROT ENABLE PROGRAMMING OF EEPROM
0072 f810 b6 10 39 LDAA OPTION SET A/D POWERUP CONTROL BIT =1
0073 f813 8a 80 ORAA #$80
0074 f815 b7 10 39 STAA OPTION
0075 f818 86 f0 LDAA #$F0 SET A/D SCAN,MULT,&GROUP
0076 f81a b7 10 30 STAA ADCTL
0077 f81d 86 02 LDAA #$02 SET DEFAULT I.F. STAT = 2 WHICH IS DIFFERENCE FREQ.
0078 f81f 97 a8 STAA IFSTAT
0079 f821 fc ff b0 LDD $FFB0 I.F. FREQ STORED IN EEPROM
0080 f824 dd 9b STD IF
0081 f826 fc ff b2 LDD $FFB2
0082 f829 dd 9d STD IF+2
0083 f82b bd f8 c9 JSR CLRIF GO TO CLEAR THE I.F. REGISTERS ROUTINE
0084 f82e ce fd 24 LDX #$FD24 RESET BAND POINTER TO START OF LIST MINUS 4
0085 f831 df 9f STX BAND
0086 f833 7f 00 83 CLR PHASE SET PHASE VALUE EQUAL TO 0 HERTZ
0087 f836 7f 00 84 CLR PHASE1
0088 f839 7f 00 85 CLR PHASE2
0089 f83c 7f 00 86 CLR PHASE3
0090 f83f bd fb cd START JSR LCDINT INITIALIZE DISPLAY
0091 f842 bd fb 64 AGAIN JSR RATES
0092 f845 b6 10 00 LDAA PORTA
0093 f848 85 01 BITA #$01 LOOK FOR UP PUSH BUTTON
0094 f84a 27 53 BEQ LOOP9
0095 f84c 85 02 BITA #$02
0096 f84e 27 64 BEQ LOOP3 LOOK FOR DOWN PUSH BUTTON
0097 f850 bd f8 e8 JSR SETIF GO TO THE SET IF REGISTER ROUTINE
0098 f853 bd f9 20 JSR BANDS GO AND PROCESS THE BAND SELECT P.B.
0099 f856 bd f9 4a LOOP8 JSR RX ROUTINE TO CALCULATE RX FREQ FROM IF FREQ.
0100 f859 bd f9 a7 JSR RIT ROUTINE TO USE RIT
0101 f85c 96 83 LDAA PHASE
0102 f85e bd fb a8 JSR SHOW
0103 f861 96 84 LDAA PHASE1
0104 f863 bd fb a8 JSR SHOW
0105 f866 96 85 LDAA PHASE2
0106 f868 bd fb a8 JSR SHOW
0107 f86b 96 86 LDAA PHASE3
0108 f86d bd fb a8 JSR SHOW
0109 f870 96 9b LDAA IF
0110 f872 bd fb a8 JSR SHOW
0111 f875 96 9c LDAA IF+1
0112 f877 bd fb a8 JSR SHOW
0113 f87a 96 9d LDAA IF+2
0114 f87c bd fb a8 JSR SHOW
0115 f87f 96 9e LDAA IF+3
0116 f881 bd fb a8 JSR SHOW
0117 f884 bd fa 32 JSR SERIAL
0118 f887 bd fa ae JSR DIVIDE
0119 f88a bd fb 14 JSR BCDCON
0120 f88d bd fb 93 JSR BCDDIS
0121 f890 bd fa 15 JSR MIXDIS
0122 f893 bd f9 f3 JSR RITBCD USE BCDDIS AND BORROW ANS REGISTERS FOR RIT DISPLAY
0123 f896 86 80 LDAA #$80 SEND DISPLAY BACK TO FIRST LOCATION OF ROW 1
0124 f898 97 80 STAA CHAR
0125 f89a bd fc 73 JSR CONTRL
0126 f89d 20 a3 BRA AGAIN
0127 f89f dc 85 LOOP9 LDD PHASE2
0128 f8a1 d3 99 ADDD RATE+2
0129 f8a3 dd 85 STD PHASE2
0130 f8a5 dc 83 LDD PHASE
0131 f8a7 25 06 BCS LOOP4
0132 f8a9 d3 97 LOOP5 ADDD RATE
0133 f8ab dd 83 STD PHASE
0134 f8ad 20 a7 BRA LOOP8
0135 f8af c3 00 01 LOOP4 ADDD #$01
0136 f8b2 20 f5 BRA LOOP5
0137 f8b4 dc 85 LOOP3 LDD PHASE2
0138 f8b6 93 99 SUBD RATE+2
0139 f8b8 dd 85 STD PHASE2
0140 f8ba dc 83 LDD PHASE
0141 f8bc 25 06 BCS LOOP6
0142 f8be 93 97 LOOP7 SUBD RATE
0143 f8c0 dd 83 STD PHASE
0144 f8c2 20 92 BRA LOOP8
0145 f8c4 83 00 01 LOOP6 SUBD #$01
0146 f8c7 20 f5 BRA LOOP7
0147 f8c9 b6 10 08 CLRIF LDAA PORTD LOOK FOR THE IF SET P.B. TO BE PUSHED ON POWER UP
0148 f8cc 85 10 BITA #$10
0149 f8ce 27 01 BEQ LOOP50
0150 f8d0 39 RTS
0151 f8d1 7f 00 9b LOOP50 CLR IF
0152 f8d4 7f 00 9c CLR IF+1
0153 f8d7 7f 00 9d CLR IF+2
0154 f8da 7f 00 9e CLR IF+3
0155 f8dd 7f 00 a8 CLR IFSTAT CLEAR THE IF STATUS REGISTER TO SHOW IF NOT SET
0156 f8e0 b6 10 08 LOOP51 LDAA PORTD LOOK FOR P.B. TO GO BACK OFF
0157 f8e3 85 10 BITA #$10
0158 f8e5 27 f9 BEQ LOOP51
0159 f8e7 39 RTS
0160 f8e8 b6 10 08 SETIF LDAA PORTD LOOK FOR IF SET P.B. TO BE PUSHED
0161 f8eb 85 10 BITA #$10
0162 f8ed 27 01 BEQ LOOP52
0163 f8ef 39 RTS
0164 f8f0 96 a8 LOOP52 LDAA IFSTAT
0165 f8f2 27 14 BEQ LOOP60 BRANCH IF IF HAS NOT BEEN SET YET
0166 f8f4 85 01 BITA #$01
0167 f8f6 26 0b BNE LOOP61 BRANCH BECAUSE IFSTAT IS NOT = 2
0168 f8f8 7a 00 a8 DEC IFSTAT MAKE IFSTAT = 1 = SUM
0169 f8fb b6 10 08 LOOP62 LDAA PORTD
0170 f8fe 85 10 BITA #$10
0171 f900 27 f9 BEQ LOOP62 LOOK FOR P.B. TO GO BACK OFF
0172 f902 39 RTS
0173 f903 7c 00 a8 LOOP61 INC IFSTAT
0174 f906 20 f3 BRA LOOP62
0175 f908 96 83 LOOP60 LDAA PHASE
0176 f90a 97 9b STAA IF
0177 f90c 96 84 LDAA PHASE1
0178 f90e 97 9c STAA IF+1
0179 f910 96 85 LDAA PHASE2
0180 f912 97 9d STAA IF+2
0181 f914 96 86 LDAA PHASE3
0182 f916 97 9e STAA IF+3
0183 f918 86 01 LDAA #$01
0184 f91a 97 a8 STAA IFSTAT PUT A 1 = SUM AND ALSO INDICATES IF HAS BEEN SET
0185 f91c bd fd 60 JSR LOAD ROUTINE TO LOAD BURN ROUTINE INTO RAM
0186 f91f 39 RTS
0187 f920 b6 10 08 BANDS LDAA PORTD IS THE BAND SELECT P.B. PUSHED?
0188 f923 85 20 BITA #$20
0189 f925 27 01 BEQ LOOP53
0190 f927 39 RTS
0191 f928 de 9f LOOP53 LDX BAND POINTER TO BAND FREQUENCIES
0192 f92a 08 INX INCREMENT POINTER TO NEXT BAND
0193 f92b 08 INX
0194 f92c 08 INX
0195 f92d 08 INX
0196 f92e 8c fd 4c CPX #$FD4C END OF BAND TABLE REACHED?
0197 f931 27 12 BEQ LOOP54 BRANCH IF YES
0198 f933 df 9f LOOP56 STX BAND
0199 f935 ec 00 LDD 00,X
0200 f937 dd 83 STD PHASE
0201 f939 ec 02 LDD 02,X
0202 f93b dd 85 STD PHASE2
0203 f93d b6 10 08 LOOP55 LDAA PORTD LOOK FOR BAND SELECT P.B. TO GO BACK OFF
0204 f940 85 20 BITA #$20
0205 f942 27 f9 BEQ LOOP55
0206 f944 39 RTS
0207 f945 ce fd 28 LOOP54 LDX #$FD28 ROLL BAND POINTER BACK TO THE FIRST LOCATION
0208 f948 20 e9 BRA LOOP56
0209 f94a 96 a8 RX LDAA IFSTAT
0210 f94c 85 02 BITA #$02 LOOK FOR IFSTAT TO INDICATE DIFFERENCE NOT SUM
0211 f94e 26 16 BNE RX3 BRANCH IF WE WANT DIFFERENCE FREQ. FOR L.O.
0212 f950 dc 85 LDD PHASE2 CALCULATE THE SUM OF SIGNAL AND I.F.
0213 f952 d3 9d ADDD IF+2
0214 f954 dd a4 STD PHARX2
0215 f956 25 07 BCS RX1
0216 f958 dc 83 LDD PHASE
0217 f95a d3 9b RX2 ADDD IF
0218 f95c dd a2 STD PHARX
0219 f95e 39 RTS
0220 f95f dc 83 RX1 LDD PHASE
0221 f961 c3 00 01 ADDD #$0001
0222 f964 20 f4 BRA RX2
0223 f966 dc 83 RX3 LDD PHASE
0224 f968 1a 93 9b CPD IF
0225 f96b 25 24 BLO RX4
0226 f96d 1a 93 9b CPD IF
0227 f970 27 0f BEQ RX5
0228 f972 dc 85 RX11 LDD PHASE2
0229 f974 93 9d SUBD IF+2
0230 f976 dd a4 STD PHARX2
0231 f978 25 10 BCS RX7
0232 f97a dc 83 LDD PHASE
0233 f97c 93 9b RX8 SUBD IF
0234 f97e dd a2 STD PHARX
0235 f980 39 RTS
0236 f981 dc 85 RX5 LDD PHASE2
0237 f983 1a 93 9d CPD IF+2
0238 f986 25 09 BLO RX4
0239 f988 20 e8 BRA RX11
0240 f98a dc 83 RX7 LDD PHASE
0241 f98c 83 00 01 SUBD #$0001
0242 f98f 20 eb BRA RX8
0243 f991 dc 9d RX4 LDD IF+2
0244 f993 93 85 SUBD PHASE2
0245 f995 dd a4 STD PHARX2
0246 f997 25 07 BCS RX9
0247 f999 dc 9b LDD IF
0248 f99b 93 83 RX10 SUBD PHASE
0249 f99d dd a2 STD PHARX
0250 f99f 39 RTS
0251 f9a0 dc 9b RX9 LDD IF
0252 f9a2 83 00 01 SUBD #$0001
0253 f9a5 20 f4 BRA RX10
0254 f9a7 b6 10 31 RIT LDAA ADR1 GET POT ANALOG VALUE
0255 f9aa 44 LSRA DIVIDE ANALOG VALUE BY 2 TO GET RID OF NOISE
0256 f9ab 97 a6 STAA RITRAW
0257 f9ad 81 40 CMPA #$40
0258 f9af 24 22 BHS RIT1
0259 f9b1 86 3f LDAA #$3F
0260 f9b3 90 a6 SUBA RITRAW
0261 f9b5 97 a6 STAA RITRAW
0262 f9b7 97 a7 STAA RITFRQ
0263 f9b9 27 0e BEQ RIT2
0264 f9bb dc a4 RIT3 LDD PHARX2
0265 f9bd 83 03 5b SUBD #$035B 10HZ PHASE VALUE
0266 f9c0 dd a4 STD PHARX2
0267 f9c2 25 06 BCS RIT4
0268 f9c4 7a 00 a6 RIT5 DEC RITRAW
0269 f9c7 26 f2 BNE RIT3
0270 f9c9 39 RIT2 RTS
0271 f9ca dc a2 RIT4 LDD PHARX
0272 f9cc 83 00 01 SUBD #$0001
0273 f9cf dd a2 STD PHARX
0274 f9d1 20 f1 BRA RIT5
0275 f9d3 80 40 RIT1 SUBA #$40
0276 f9d5 97 a6 STAA RITRAW
0277 f9d7 97 a7 STAA RITFRQ
0278 f9d9 27 0e BEQ RIT6
0279 f9db dc a4 RIT7 LDD PHARX2
0280 f9dd c3 03 5b ADDD #$035B 10HZ PHASE VALUE
0281 f9e0 dd a4 STD PHARX2
0282 f9e2 25 06 BCS RIT8
0283 f9e4 7a 00 a6 RIT9 DEC RITRAW
0284 f9e7 26 f2 BNE RIT7
0285 f9e9 39 RIT6 RTS
0286 f9ea dc a2 RIT8 LDD PHARX
0287 f9ec c3 00 01 ADDD #$0001
0288 f9ef dd a2 STD PHARX
0289 f9f1 20 f1 BRA RIT9
0290 f9f3 96 a7 RITBCD LDAA RITFRQ
0291 f9f5 c6 0a LDAB #$0A MULTIPLY RITFRQ TO GET RIT FREQUENCY IN HERTZ
0292 f9f7 3d MUL
0293 f9f8 dd 94 STD ANS+2
0294 f9fa 7f 00 92 CLR ANS
0295 f9fd 7f 00 93 CLR ANS+1
0296 fa00 bd fb 14 JSR BCDCON
0297 fa03 86 cc LDAA #$CC SEND DISPLAY TO 2 ROW LOCATION 13
0298 fa05 97 80 STAA CHAR
0299 fa07 bd fc 73 JSR CONTRL
0300 fa0a 96 90 LDAA BCD+2
0301 fa0c bd fb a8 JSR SHOW
0302 fa0f 96 91 LDAA BCD+3
0303 fa11 bd fb a8 JSR SHOW
0304 fa14 39 RTS
0305 fa15 86 c9 MIXDIS LDAA #$C9 SEND DISPLAY TO SECOND ROW LOCATION 10
0306 fa17 97 80 STAA CHAR
0307 fa19 bd fc 73 JSR CONTRL
0308 fa1c 96 a8 LDAA IFSTAT
0309 fa1e 85 01 BITA #$01
0310 fa20 26 08 BNE MIX1 BRANCH IF WE ARE DOING THE SUM
0311 fa22 86 20 LDAA #$20 BLANK DISPLAY CHARACTER
0312 fa24 97 80 STAA CHAR
0313 fa26 bd fc a1 JSR DISLET
0314 fa29 39 RTS
0315 fa2a 86 5e MIX1 LDAA #$5E DISPLAY CHARACTER ^ TO SHOW MIXER IS SUMMING
0316 fa2c 97 80 STAA CHAR
0317 fa2e bd fc a1 JSR DISLET
0318 fa31 39 RTS
0319 fa32 7f 00 a1 SERIAL CLR FREQ FREQ0/FREQ1 FLAG. 0=FREQ0=TX,1=FREQ1=RX REGISTERS
0320 fa35 b6 10 04 LDAA PORTB
0321 fa38 84 df ANDA #$DF SET TC0=0=FREQ0=TX FREQ
0322 fa3a b7 10 04 STAA PORTB
0323 fa3d 86 20 SER LDAA #$20 ROUTINE TO SEND DELTA PHASE TO AD7008 SERIAL
0324 fa3f 97 87 STAA SERCNT
0325 fa41 96 a1 LDAA FREQ
0326 fa43 26 54 BNE SER1
0327 fa45 dc 83 LDD PHASE
0328 fa47 dd 88 SER2 STD HOLD
0329 fa49 dc 88 LOOP10 LDD HOLD
0330 fa4b 05 ASLD
0331 fa4c 25 0c BCS LOOP11
0332 fa4e dd 88 STD HOLD
0333 fa50 b6 10 04 LDAA PORTB
0334 fa53 84 bf ANDA #$BF SDATA LINE=0
0335 fa55 b7 10 04 STAA PORTB
0336 fa58 20 0a BRA LOOP12
0337 fa5a dd 88 LOOP11 STD HOLD
0338 fa5c b6 10 04 LDAA PORTB
0339 fa5f 8a 40 ORAA #$40 SDATA LINE=1
0340 fa61 b7 10 04 STAA PORTB
0341 fa64 8a 80 LOOP12 ORAA #$80 BRING SCLK LINE HIGH
0342 fa66 b7 10 04 STAA PORTB
0343 fa69 84 7f ANDA #$7F BRING SCLK LINE LOW
0344 fa6b b7 10 04 STAA PORTB
0345 fa6e 7a 00 87 DEC SERCNT
0346 fa71 96 87 LDAA SERCNT
0347 fa73 81 10 CMPA #$10 DONE PROCESSING FIRST 16 BITS?
0348 fa75 27 06 BEQ LOOP13
0349 fa77 81 00 CMPA #$00 DONE PROCESSING ALL 32 BITS?
0350 fa79 27 0c BEQ LOOP14
0351 fa7b 20 cc BRA LOOP10
0352 fa7d 96 a1 LOOP13 LDAA FREQ
0353 fa7f 26 1c BNE SER3
0354 fa81 dc 85 LDD PHASE2
0355 fa83 dd 88 SER4 STD HOLD
0356 fa85 20 c2 BRA LOOP10
0357 fa87 b6 10 04 LOOP14 LDAA PORTB
0358 fa8a 8a 10 ORAA #$10 BRING LOAD LINE HIGH
0359 fa8c b7 10 04 STAA PORTB
0360 fa8f 84 ef ANDA #$EF BRING LOAD LINE LOW
0361 fa91 b7 10 04 STAA PORTB
0362 fa94 96 a1 LDAA FREQ
0363 fa96 27 09 BEQ SER5
0364 fa98 39 RTS
0365 fa99 dc a2 SER1 LDD PHARX
0366 fa9b 20 aa BRA SER2
0367 fa9d dc a4 SER3 LDD PHARX2
0368 fa9f 20 e2 BRA SER4
0369 faa1 7c 00 a1 SER5 INC FREQ
0370 faa4 b6 10 04 LDAA PORTB
0371 faa7 8a 20 ORAA #$20
0372 faa9 b7 10 04 STAA PORTB
0373 faac 20 8f BRA SER
0374
0375 faae cc 00 00 DIVIDE LDD #$0000 CLEAR ANSWER REGISTER
0376 fab1 dd 92 STD ANS
0377 fab3 dd 94 STD ANS+2
0378 fab5 dc 83 LDD PHASE TRANSFER PHASE VALUE INTO WORKING BYTE REGISTERS
0379 fab7 dd 8a STD BYTE
0380 fab9 dc 85 LDD PHASE2
0381 fabb dd 8c STD BYTE+2
0382 fabd ce fd 00 LDX #$FD00
0383 fac0 dc 8a LOOP21 LDD BYTE
0384 fac2 1a a3 00 CPD 00,X
0385 fac5 22 12 BHI LOOP22
0386 fac7 27 42 BEQ LOOP23
0387 fac9 c6 08 LOOP15 LDAB #$08
0388 facb 3a ABX
0389 facc 8c fd 28 CPX #$FD28 DONE CONVERTING PHASE TO FREQ?
0390 facf 26 ef BNE LOOP21
0391 fad1 86 c0 LDAA #$C0 SEND DISPLAY TO FIRST LOCATION OF ROW 2
0392 fad3 97 80 STAA CHAR
0393 fad5 bd fc 73 JSR CONTRL
0394 fad8 39 RTS
0395 fad9 dc 8c LOOP22 LDD BYTE+2
0396 fadb a3 02 SUBD 02,X
0397 fadd 25 18 BCS LOOP25
0398 fadf dd 8c STD BYTE+2
0399 fae1 dc 8a LOOP26 LDD BYTE
0400 fae3 a3 00 SUBD $00,X
0401 fae5 dd 8a STD BYTE
0402 fae7 dc 94 LDD ANS+2
0403 fae9 e3 06 ADDD $06,X
0404 faeb dd 94 STD ANS+2
0405 faed 25 13 BCS LOOP27
0406 faef dc 92 LOOP28 LDD ANS
0407 faf1 e3 04 ADDD $04,X
0408 faf3 dd 92 STD ANS
0409 faf5 20 c9 BRA LOOP21
0410 faf7 dd 8c LOOP25 STD BYTE+2
0411 faf9 dc 8a LDD BYTE
0412 fafb 83 00 01 SUBD #$01
0413 fafe dd 8a STD BYTE
0414 fb00 20 df BRA LOOP26
0415 fb02 dc 92 LOOP27 LDD ANS
0416 fb04 c3 00 01 ADDD #$0001
0417 fb07 dd 92 STD ANS
0418 fb09 20 e4 BRA LOOP28
0419 fb0b dc 8c LOOP23 LDD BYTE+2
0420 fb0d 1a a3 02 CPD $02,X
0421 fb10 24 c7 BHS LOOP22
0422 fb12 20 b5 BRA LOOP15
0423 fb14 ce 00 8e BCDCON LDX #BCD
0424 fb17 6f 03 CLR 03,X
0425 fb19 6f 02 CLR 02,X
0426 fb1b 6f 01 CLR 01,X
0427 fb1d 6f 00 CLR 00,X
0428 fb1f 86 20 LDAA #$20
0429 fb21 97 96 STAA BCDCTR
0430 fb23 a6 03 L20 LDAA 03,X
0431 fb25 8d 2a BSR CALC
0432 fb27 e7 03 STAB 03,X
0433 fb29 a6 02 LDAA 02,X
0434 fb2b 8d 24 BSR CALC
0435 fb2d e7 02 STAB 02,X
0436 fb2f a6 01 LDAA 01,X
0437 fb31 8d 1e BSR CALC
0438 fb33 e7 01 STAB 01,X
0439 fb35 a6 00 LDAA 00,X
0440 fb37 8d 18 BSR CALC
0441 fb39 e7 00 STAB 00,X
0442 fb3b 68 07 ASL 07,X
0443 fb3d 69 06 ROL 06,X
0444 fb3f 69 05 ROL 05,X
0445 fb41 69 04 ROL 04,X
0446 fb43 69 03 ROL 03,X
0447 fb45 69 02 ROL 02,X
0448 fb47 69 01 ROL 01,X
0449 fb49 69 00 ROL 00,X
0450 fb4b 7a 00 96 DEC BCDCTR
0451 fb4e 26 d3 BNE L20
0452 fb50 39 RTS
0453 fb51 16 CALC TAB
0454 fb52 84 0f ANDA #$0F
0455 fb54 80 05 SUBA #$05
0456 fb56 2b 02 BMI L14
0457 fb58 cb 03 ADDB #$03
0458 fb5a 17 L14 TBA
0459 fb5b 84 f0 ANDA #$F0
0460 fb5d 80 50 SUBA #$50
0461 fb5f 2b 02 BMI L15
0462 fb61 cb 30 ADDB #$30
0463 fb63 39 L15 RTS
0464 fb64 b6 10 00 RATES LDAA PORTA
0465 fb67 85 04 BITA #$04 LOOK FOR 10 HERTZ PER STEP INPUT
0466 fb69 27 12 BEQ LOOP40
0467 fb6b b6 10 00 LDAA PORTA
0468 fb6e 85 80 BITA #$80 LOOK FOR .1 MHZ PER STEP INPUT
0469 fb70 27 16 BEQ LOOP41
0470 fb72 cc 00 01 LDD #$01 SET RATE FOR 1000 HERTZ PER STEP
0471 fb75 dd 97 STD RATE
0472 fb77 cc 4f 8b LDD #$4F8B
0473 fb7a dd 99 STD RATE+2
0474 fb7c 39 RTS
0475 fb7d cc 00 00 LOOP40 LDD #$00 SET RATE FOR 10 HERTZ PER STEP
0476 fb80 dd 97 STD RATE
0477 fb82 cc 03 5b LDD #$035B
0478 fb85 dd 99 STD RATE+2
0479 fb87 39 RTS
0480 fb88 cc 00 83 LOOP41 LDD #$83 SET RATE FOR .1 MHZ PER STEP
0481 fb8b dd 97 STD RATE
0482 fb8d cc 12 6e LDD #$126E
0483 fb90 dd 99 STD RATE+2
0484 fb92 39 RTS
0485 fb93 96 8e BCDDIS LDAA BCD
0486 fb95 bd fb a8 JSR SHOW
0487 fb98 96 8f LDAA BCD+1
0488 fb9a bd fb a8 JSR SHOW
0489 fb9d 96 90 LDAA BCD+2
0490 fb9f bd fb a8 JSR SHOW
0491 fba2 96 91 LDAA BCD+3
0492 fba4 bd fb a8 JSR SHOW
0493 fba7 39 RTS
0494 fba8 97 82 SHOW STAA TEMP TAKES HEX REG. VALUE & CONVERTS TO MSD & LSD
0495 fbaa 84 f0 ANDA #$F0
0496 fbac 44 LSRA
0497 fbad 44 LSRA
0498 fbae 44 LSRA
0499 fbaf 44 LSRA
0500 fbb0 8d 07 BSR CONVRT
0501 fbb2 96 82 LDAA TEMP
0502 fbb4 84 0f ANDA #$0F
0503 fbb6 8d 01 BSR CONVRT
0504 fbb8 39 RTS
0505 fbb9 81 09 CONVRT CMPA #$09 CONVERT FROM HEX TO ASCII VALUE FOR LCD DISPLAY
0506 fbbb 22 08 BHI LOOP30 BRANCH WHEN NUMBER GREATER THEN 9
0507 fbbd 8b 30 ADDA #$30 CONVERT 0 THRU 9 TO ASCII VALUE
0508 fbbf 97 80 STAA CHAR
0509 fbc1 bd fc a1 JSR DISLET
0510 fbc4 39 RTS
0511 fbc5 8b 37 LOOP30 ADDA #$37 CONVERT A THRU F TO ASCII VALUE
0512 fbc7 97 80 STAA CHAR
0513 fbc9 bd fc a1 JSR DISLET
0514 fbcc 39 RTS
0515
0516 fbcd bd fc 27 LCDINT JSR DELAY
0517 fbd0 bd fc 27 JSR DELAY
0518 fbd3 bd fc 27 JSR DELAY
0519 fbd6 bd fc 27 JSR DELAY
0520 fbd9 bd fc 27 JSR DELAY
0521 fbdc 86 03 LDAA #$03
0522 fbde bd fc 19 JSR CSTROB
0523 fbe1 bd fc 27 JSR DELAY
0524 fbe4 86 03 LDAA #$03
0525 fbe6 bd fc 19 JSR CSTROB
0526 fbe9 bd fc 27 JSR DELAY
0527 fbec 86 03 LDAA #$03
0528 fbee bd fc 19 JSR CSTROB
0529 fbf1 bd fc 27 JSR DELAY *MODIFIED WAS BUSY
0530 fbf4 86 02 LDAA #$02
0531 fbf6 bd fc 19 JSR CSTROB
0532 fbf9 bd fc 27 JSR DELAY *MODIFIED WAS BUSY
0533 fbfc 86 28 LDAA #$28
0534 fbfe 97 80 STAA CHAR
0535 fc00 bd fc 73 JSR CONTRL
0536 fc03 86 0e LDAA #$0E
0537 fc05 97 80 STAA CHAR
0538 fc07 bd fc 73 JSR CONTRL
0539 fc0a 86 01 LDAA #$01
0540 fc0c 97 80 STAA CHAR
0541 fc0e bd fc 73 JSR CONTRL
0542 fc11 86 06 LDAA #$06
0543 fc13 97 80 STAA CHAR
0544 fc15 bd fc 73 JSR CONTRL
0545 fc18 39 RTS
0546 fc19 b7 10 03 CSTROB STAA PORTC
0547 fc1c 8a 40 ORAA #$40
0548 fc1e b7 10 03 STAA PORTC
0549 fc21 84 3f ANDA #$3F
0550 fc23 b7 10 03 STAA PORTC
0551 fc26 39 RTS
0552 fc27 ce 01 ff DELAY LDX #$01FF
0553 fc2a 01 LOOP1 NOP
0554 fc2b 01 NOP
0555 fc2c 01 NOP
0556 fc2d 01 NOP
0557 fc2e 01 NOP
0558 fc2f 09 DEX
0559 fc30 27 03 BEQ LOOP2
0560 fc32 7e fc 2a JMP LOOP1
0561 fc35 39 LOOP2 RTS
0562 fc36 86 77 BUSY LDAA #$77
0563 fc38 b7 10 07 STAA DDRC
0564 fc3b 86 10 HOP1 LDAA #$10
0565 fc3d b7 10 03 STAA PORTC
0566 fc40 8a 40 ORAA #$40
0567 fc42 b7 10 03 STAA PORTC
0568 fc45 b6 10 03 LDAA PORTC
0569 fc48 84 08 ANDA #$08
0570 fc4a 26 15 BNE HOP2
0571 fc4c 86 10 LDAA #$10
0572 fc4e b7 10 03 STAA PORTC
0573 fc51 8a 40 ORAA #$40
0574 fc53 b7 10 03 STAA PORTC
0575 fc56 84 3f ANDA #$3F
0576 fc58 b7 10 03 STAA PORTC
0577 fc5b 86 7f LDAA #$7F
0578 fc5d b7 10 07 STAA DDRC
0579 fc60 39 RTS
0580 fc61 86 10 HOP2 LDAA #$10
0581 fc63 b7 10 03 STAA PORTC
0582 fc66 8a 40 ORAA #$40
0583 fc68 b7 10 03 STAA PORTC
0584 fc6b 84 3f ANDA #$3F
0585 fc6d b7 10 03 STAA PORTC
0586 fc70 7e fc 3b JMP HOP1
0587 fc73 96 80 CONTRL LDAA CHAR
0588 fc75 84 0f ANDA #$0F
0589 fc77 97 81 STAA LOBYTE
0590 fc79 96 80 LDAA CHAR
0591 fc7b 84 f0 ANDA #$F0
0592 fc7d 44 LSRA
0593 fc7e 44 LSRA
0594 fc7f 44 LSRA
0595 fc80 44 LSRA
0596 fc81 b7 10 03 STAA PORTC
0597 fc84 8a 40 ORAA #$40
0598 fc86 b7 10 03 STAA PORTC
0599 fc89 84 3f ANDA #$3F
0600 fc8b b7 10 03 STAA PORTC
0601 fc8e 96 81 LDAA LOBYTE
0602 fc90 b7 10 03 STAA PORTC
0603 fc93 8a 40 ORAA #$40
0604 fc95 b7 10 03 STAA PORTC
0605 fc98 84 3f ANDA #$3F
0606 fc9a b7 10 03 STAA PORTC
0607 fc9d bd fc 36 JSR BUSY
0608 fca0 39 RTS
0609 fca1 96 80 DISLET LDAA CHAR
0610 fca3 84 0f ANDA #$0F
0611 fca5 97 81 STAA LOBYTE
0612 fca7 96 80 LDAA CHAR
0613 fca9 84 f0 ANDA #$F0
0614 fcab 44 LSRA
0615 fcac 44 LSRA
0616 fcad 44 LSRA
0617 fcae 44 LSRA
0618 fcaf 8a 20 ORAA #$20
0619 fcb1 b7 10 03 STAA PORTC
0620 fcb4 8a 40 ORAA #$40
0621 fcb6 b7 10 03 STAA PORTC
0622 fcb9 84 3f ANDA #$3F
0623 fcbb b7 10 03 STAA PORTC
0624 fcbe 96 81 LDAA LOBYTE
0625 fcc0 8a 20 ORA #$20
0626 fcc2 b7 10 03 STAA PORTC
0627 fcc5 8a 40 ORAA #$40
0628 fcc7 b7 10 03 STAA PORTC
0629 fcca 84 3f ANDA #$3F
0630 fccc b7 10 03 STAA PORTC
0631 fccf bd fc 36 JSR BUSY
0632 fcd2 39 RTS
0633 *PHASE VS FREQ. VALUES FOR CALCULATING FREQ. FROM PHASE VALUE
0634 fd00 ORG $FD00
0635 fd00 05 1e b8 52 FCB $05,$1E,$B8,$52 PHASE VALUE FOR 1,000,000.001 HZ
0636 fd04 00 0f 42 40 FCB $00,$0F,$42,$40 FREQUENCY VALUE FOR 1,000,000 HZ
0637 fd08 00 0d 6c fb FCB $00,$0D,$6C,$FB PHASE VALUE FOR 10243.0000 HZ
0638 fd0c 00 00 28 03 FCB $00,$00,$28,$03 FREQUENCY VALUE FOR 10243 HZ
0639 fd10 00 00 35 5a FCB $00,$00,$35,$5A PHASE VALUE FOR 159.0000466 HZ
0640 fd14 00 00 00 9f FCB $00,$00,$00,$9F FREQUENCY VALUE FOR 159 HZ
0641 fd18 00 00 03 5b FCB $00,$00,$03,$5B PHASE VALUE FOR 10.00007615 HZ
0642 fd1c 00 00 00 0a FCB $00,$00,$00,$0A FREQUENCY VALUE FOR 10 HZ
0643 fd20 00 00 00 56 FCB $00,$00,$00,$56 PHASE VALUE FOR 1.001171768 HZ
0644 fd24 00 00 00 01 FCB $00,$00,$00,$01 FREQUENCY VALUE FOR 1 HZ
0645 *PHASE VS START OF BAND FOR BAND SELECT P.B.
0646 fd28 ORG $FD28
0647 fd28 09 37 4b c7 FCB $09,$37,$4B,$C7 PHASE VALUE FOR 1.8 MHZ
0648 fd2c 11 eb 85 20 FCB $11,$EB,$85,$20 PHASE VALUE FOR 3.5 MHZ
0649 fd30 23 d7 0a 3e FCB $23,$D7,$0A,$3E PHASE VALUE FOR 7 MHZ
0650 fd34 33 b6 45 a3 FCB $33,$B6,$45,$A3 PHASE VALUE FOR 10.1 MHZ
0651 fd38 47 ae 14 7c FCB $47,$AE,$14,$7C PHASE VALUE FOR 14 MHZ
0652 fd3c 5c 82 16 c8 FCB $5C,$82,$16,$C8 PHASE VALUE FOR 18.068 MHZ
0653 fd40 6b 85 1e ba FCB $6B,$85,$1E,$BA PHASE VALUE FOR 21 MHZ
0654 fd44 7f 6f d2 23 FCB $7F,$6F,$D2,$23 PHASE VALUE FOR 24.89 MHZ
0655 fd48 8f 5c 28 f8 FCB $8F,$5C,$28,$F8 PHASE VALUE FOR 28 MHZ
0656 *ROUTINE TO LOAD BURN ROUTINE INTO RAM
0657 fd60 ORG $FD60
0658 fd60 ce fd 79 LOAD LDX #$FD79
0659 fd63 18 ce 00 00 LDY #$0000
0660 fd67 a6 00 LOAD1 LDAA 00,X
0661 fd69 18 a7 00 STAA 00,Y
0662 fd6c 08 INX
0663 fd6d 18 08 INY
0664 fd6f 8c fd c5 CPX #$FDC5 END OF BURN ROUTINE IN EEPROM REACHED?
0665 fd72 27 02 BEQ LOAD2
0666 fd74 20 f1 BRA LOAD1
0667 fd76 7e 00 00 LOAD2 JMP $0000 JUMP TO BURN ROUTINE IN LOADED IN RAM
0668 *EEPROM BURN ROUTINE THAT MUST BE LOADED INTO RAM BEFORE RUNNING
0669 fd79 ORG $FD79
0670 fd79 ce ff b0 LDX #$FFB0 EEPROM ROW TO ERASE
0671 fd7c c6 0e ERASE LDAB #$0E
0672 fd7e f7 10 3b STAB $103B
0673 fd81 e7 00 STAB 00,X
0674 fd83 c6 0f LDAB #$0F
0675 fd85 f7 10 3b STAB $103B
0676 fd88 8d 28 BSR DLY10
0677 fd8a 7f 10 3b CLR $103B
0678 fd8d ce ff b0 BURN LDX #$FFB0
0679 fd90 18 ce 00 9b LDY #$009B START LOCATION OF IF PHASE VALUE IN RAM
0680 fd94 18 a6 00 BURN1 LDAA 00,Y
0681 fd97 c6 02 LDAB #$02
0682 fd99 f7 10 3b STAB $103B
0683 fd9c a7 00 STAA 00,X
0684 fd9e c6 03 LDAB #$03
0685 fda0 f7 10 3b STAB $103B
0686 fda3 8d 0d BSR DLY10
0687 fda5 7f 10 3b CLR $103B
0688 fda8 08 INX
0689 fda9 18 08 INY
0690 fdab 18 8c 00 9f CPY #$009F
0691 fdaf 26 e3 BNE BURN1
0692 fdb1 39 RTS
0693 *10 MSEC DELAY SUBROUTINE FOR EEPROM BURNING
0694 fdb2 86 06 DLY10 LDAA #$06
0695 fdb4 c6 ff DLY2 LDAB #$FF
0696 fdb6 01 DLY1 NOP
0697 fdb7 01 NOP
0698 fdb8 01 NOP
0699 fdb9 5a DECB
0700 fdba 27 02 BEQ DLY3
0701 fdbc 20 f8 BRA DLY1
0702 fdbe 4a DLY3 DECA
0703 fdbf 27 02 BEQ DLY4
0704 fdc1 20 f1 BRA DLY2
0705 fdc3 39 DLY4 RTS
0706
0707
0708 *EEPROM STORAGE OF I.F. FREQUENCY PROGRAMMED BY USER USING I.F. PUSH BUTTON
0709 ffb0 ORG $FFB0
0710 ffb0 00 00 00 00 FCB $00,$00,$00,$00
0711
0712 *START UP VECTOR
0713 fffe ORG $FFFE
0714 fffe f8 00 FCB $F8,$00
0715 END
0716
0717
0718
0719
0720
0721
0722
0723
0724
0725
0726
Number of errors 0